<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>门店管理 - 库存报损</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 库存报损 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 门店管理 <i class="icon-angle-right"></i> </li>
          <li> <a href="/store/stocklist">库存列表</a> <i class="icon-angle-right"></i> </li>
          <li>库存报损</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN SAMPLE FORM PORTLET-->
          <div class="tabbable tabbable-custom boxless">            
            <div class="tab-content">              
                      
             
              <!--star Tab2--> 
               <form class="form-horizontal" method="post" action="/store/savedamaged" role="form" onsubmit="return goodsnumber()">
                <input type="hidden" name="goods_id" value="<?=$this->goodsid;?>"/>
                <input type="hidden" name="store_id" value="<?=$this->store_id;?>" id="_this->store_id"/>
                <input type="hidden" name="ref" value="<?=$this->ref;?>"> 
              <div class="tab-pane active" id="tab_2">
                <div class="portlet box blue ">
                  <div class="portlet-title">
                    <div class="caption"> <i class="icon-reorder"></i> 详细信息 </div>
                  </div>           
                  <div class="portlet-body form">
                    <div class="form-body">                   	
                    <div class="form-group">                  
                        <label  class="col-md-3 control-label">当前库存</label>
                        <div class="col-md-2">
                          <h5><?php if($this->goods_number){echo $this->goods_number;}else{echo '0';}?></h5>
                          </div>
                      </div>
                      <div class="form-group">                  
                        <label  class="col-md-3 control-label">报损数量</label>
                        <div class="col-md-2">
                          <input type="text" name="goods_number" value="" placeholder="0" id="_goods_number" maxlength="10" class="form-control">
                          <span class="help-block">必须是大于0的正整数</span> 
                          </div>
                      </div>

                      <div class="form-group">
                          <label class="col-md-3 control-label">报损原因</label>
                          <div class="col-md-4">
                             <textarea class="form-control" name="note" id="_note" rows="3"></textarea>
                          </div>
                      </div>
                      
                  
                    </div>
                    <div class="form-actions fluid">
                      <div class="col-md-offset-3 col-md-9">
                        <button type="submit" class="btn blue">提交</button>
                        <button type="button" class="btn dark" onclick="history.back(1);">返回</button>
                      </div>
                  </div>              
                </div>
              </div> 
                   </form> 
               <!--End Tab2-->
            </div>
          </div>
      
        <!-- END SAMPLE FORM PORTLET--> 
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
jQuery(document).ready(function() {    
   App.init();
});
	
</script> 
<script type="text/javascript">
function goodsnumber(){
	if($("#_goods_number").val()=="" || isNaN($("#_goods_number").val())){
		alert("请填写报损数量");
    $("#_goods_number").focus();
		return false;
	}

  if( $("#_note").val()=="")
  {
    alert("请填写报损原因");
    $("#_note").focus();
    return false;
  }
}
</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>